﻿<%@page import="com.vo.Systemss"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="page/page.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	Systemss systemss = Systemss.dao.findById(1);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<jsp:include page="page/Plug1.jsp"></jsp:include>
<script type="text/javascript">
$(document).ready(function() {
	$("li#top1").addClass("active");
	$("#indexform").Validform({
		tiptype : 1,
		postonce:true,
		ajaxPost:true,
		ignoreHidden:true,
		callback:function(data){
			if(data.status=="y"){
				setTimeout(function(){
					$.Hidemsg(); 
					window.location.href="<%=basePath%>/user";
				},1000);
			}else{
				setTimeout(function(){
					$.Hidemsg(); 
					window.location.href="<%=basePath%>/login/goLogin";
				},1000);
			}
		}
	});
});
</script>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>商户登录 - 汇点支付</title>
    <link rel="icon" href="favicon.ico" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>/style/css/login.css" />
<!--     <script type="text/javascript" src="<%=basePath%>/style/js/jquery-1.10.1.min.js"></script> -->
<!--     <script type="text/jscript" src="<%=basePath%>/style/js/jquery.cookie.js"></script> -->
</head>
<body class="bg_img">

	<script type="text/javascript" src="<%=basePath %>/static/js/PassGuardCtrl.js"></script>
	<script type="text/javascript">
		var pgeditor = new $.pge({
			pgePath: "static/ocx/",		//控件文件目录
			pgeId: "_ocx_password",			//控件ID
			pgeEdittype: 0,					//控件类型,0星号,1明文
			pgeClass: "ocx_style",			//控件css样式
			pgeTabindex: 2,					//tab键顺序
			tabCallback:"code_id",			//非IE tab键焦点切换的ID
			pgeMaxlength: 32,				//允许最大输入长度
			pgeEreg1: "[\\s\\S]*",			//输入过程中字符类型限制
			pgeEreg2: "[\\s\\S]{6,32}"		//输入完毕后字符类型判断条件
		});	
	</script>

    <div class="page-login2">
        <div class="contant">
            <div class="bg">
            </div>
            <div class="box">
                <div class="title">
                </div>
       			<form id="indexform" action="<%=basePath %>/login/login" method="post">
                <div class="inputs">
                    <div class="user">
                        <input type="text" id="uName" name="email" placeholder="请输入邮箱" datatype="*"
								errormsg="请输入邮箱"/>
                        <!-- 如果验证正确就是加ture,否则就是加false -->
                    
                    </div>
                    <div class="pass">
                        <input type="password" id="pwd" name="password" placeholder="请输入密码" datatype="*"
								errormsg="请输入密码" />
                    </div>
<!--                     <div class="verification"> -->
<!--                         <input type="text" id="vdCode" placeholder="请输入验证码" /> -->
<!--                         <span class="img"> -->
<!--                             <img src="<%=basePath%>/captcha-image" alt="图片看不清？点击重新得到验证码" name="verifypic" align="middle" -->
<!--                                 id="verifypic" onclick="this.src='<%=basePath%>/captcha-image/captcha-image?'+Math.floor(Math.random() * 100)" /></span> -->
<!--                         <p class="Error js_vdCode"> -->
<!--                         </p> -->
<!--                     </div> -->
                    <div class="chexbox">
                        <a href="password.php" target="_blank">忘记密码？</a>
                    </div>
             		<input type="submit" name="login_sub" value="登  录" class="btn" />
                    <div class="zhuce">
                        如果您还没有注册汇点，<a href="register.php" target="_blank">请点击这里申请注册</a>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
    <!--  版权 -->
    <div class="page-footer">版权所有&copy;2018 汇点支付 All Rights Reserved. 皖ICP备17009683号</div>
    <!--  版权 end-->
<!--     <script type="text/javascript" src="/style/js/canvas-particle.js"></script> -->
    <script type="text/javascript">
    
    $(document).ready(function() {
		$("li#top1").addClass("active");
		$("#indexform").Validform({
			tiptype : 1,
			postonce:true,
			ajaxPost:true,
			ignoreHidden:true,
			callback:function(data){
				if(data.status=="y"){
					setTimeout(function(){
						$.Hidemsg(); 
						window.location.href="<%=basePath%>/user";
					},1000);
				}else{
					setTimeout(function(){
						$.Hidemsg(); 
						window.location.href="<%=basePath%>/";
					},1000);
				}
			}
		});
	});
	
        $(".class-login ul li").click(function (event) {
            $(this).addClass('cur').siblings().removeClass('cur');
        });
        $(function () {
            document.onkeydown = function (e) {
                var ev = document.all ? window.event : e;
                if (ev.keyCode == 13) {
                    Checklogin();
                }
            }
        });
        
        /* function Checklogin() {
            var inputuName = $("#uName");
            var inputPwd = $("#pwd");
            var inputVdcde = $("#vdCode");
            var check = $("#jizhumima").is(":checked");
            var uName = inputuName.val();
            var pwd = inputPwd.val();
            var Vdcde = inputVdcde.val();
            if (uName.length == 0) {
                judgeValue(1);
                return;
            }
            if (pwd.length == 0) {
                judgeValue(2);
                return;
            }
            if (Vdcde.length == 0) {
                judgeValue(3);
                return;
            }
            var option = {
                data: {
                    email: uName,
                    password: pwd,
                    Vdcde: Vdcde,
                    check: check,
                    a: "login"
                },
                url: "/login/login",
                type: "post",
                dataType: "json",
                success: function (data) {
                    var obthis = $(".js_vdCode");
                    if (data.code == "1") {
                        if ("" == "") {
                            location.href = "/index.php";
                        } else {
                            location.href = location.search.replace("?returnurl=", "");
                        }

                    } else {
                        if (data.code == "-1") {
                            $("#uName").next().html(data.msg).show();
                            $("#uName").addClass("cuowu");
                            obthis.hide();
                        }
                        else if (data.code == "-2") {
                            $("#pwd").next().html(data.msg).show();
                            $("#pwd").addClass("cuowu");
                            obthis.hide();
                            $("#verifypic").attr("src", '/ValidateCode.aspx?abc=' + Math.random());
                            $("#vdCode").val('');

                        }
                        else if (data.code == "-3") {
                            var verification = $(".verification");
                            var obthis = $(".js_vdCode");
                            obthis.html(data.msg).show();
                            verification.addClass("false");
                            $("#verifypic").attr("src", '/ValidateCode.aspx?abc=' + Math.random());
                        }
                        else if (data.code == "-6") {
                            location.href = '/Default.aspx';
                        }
                        else if (data.code == "-7") { 
                            location.href = "/Authorize/usersetup.aspx";
                        }
                        else {
                            obthis.html(data.msg).show();
                        }
                    }
                }
            };
            $.ajax(option);
        } */

        /* function loginOut() {
            var option = {
                data: {
                    a: "logout"
                },
                url: "/Handler/LoginHandler.php",
                type: "post",
                dataType: "json",
                success: function (data) {
                    if (data.code == "1") {
                        location.href = "/index.php";
                    } else {
                        $("#pwd").next().html("<em>!</em>" + data.msg + "</p>").show();
                    }
                }
            };
            $.ajax(option);
        } */
        	//得到Cookie值
        /* function GetCookie(name) {
            var aCookie = document.cookie.split(";");
            for (var i = 0; i < aCookie.length; i++) {
                var str = aCookie[i].replace(/(^\s*)|(\s*$)/g, "");
                var aCrumb = str.split("=");
                if (name == aCrumb[0])
                    return unescape(aCrumb[1]);
            }
            return "";
        } */
        /* function judgeValue(select) {
            if (select == 1) {
                //账号
                var uNameobthis = $("#uName");
                var userclass = $(".user");
                if (uNameobthis.val().length == 0) {
                    uNameobthis.next().html("请输入商户帐号");
                    userclass.addClass("false");
                    uNameobthis.next().show();
                } else {
                    userclass.removeClass("false");
                    uNameobthis.next().hide();
                }
            } else if (select == 2) {
                //密码
                var pwdobthis = $("#pwd");
                var pwdclass = $(".pass");
                if (pwdobthis.val().length == 0) {
                    pwdobthis.next().html("请输入商户密码");
                    pwdclass.addClass("false");
                    pwdobthis.next().show();
                } else {
                    pwdclass.removeClass("false");
                    pwdobthis.next().hide();
                }
            } else {

                //验证码
                var vdCodethis = $("#vdCode");
                var verification = $(".verification");
                var obthis = $(".js_vdCode");
                if (vdCodethis.val().length == 0) {
                    obthis.html("请输入验证码");
                    verification.addClass("false");
                    obthis.show();
                } else {
                    verification.removeClass("false");
                    obthis.hide();
                }
            } 
        } */

       /*  $(function () {
            $("#uName").blur(function () {
                if ($(this).val().trim() == "") {
                    var userclass = $(".user");
                    userclass.removeClass("false");
                    $(this).next().hide();
                }
            });
            $("#pwd").blur(function () {
                if ($(this).val().trim() == "") {
                    var userclass = $(".pass");
                    userclass.removeClass("false");
                    $(this).next().hide();
                }
            });
            $("#vdCode").blur(function () {
                var obthis = $(".js_vdCode");
                if ($(this).val().trim() == "") {
                    var userclass = $(".verification");
                    userclass.removeClass("false");
                    obthis.hide();
                }
            });

            $("#uName").keyup(function () {
                judgeValue(1);
            });
            $("#pwd").keyup(function () {
                judgeValue(2);
            });
            $("#vdCode").keyup(function () {
                judgeValue(3);
            });
        });
        if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
            $(window).load(function () {
                $('input:-webkit-autofill').each(function () {
                    var text = $(this).val(); var name = $(this).attr('name');
                    $(this).after(this.outerHTML).remove();
                    $('input[name=' + name + ']').val(text);
                });
            });
        } */
    </script>
    <script type="text/javascript">
        window.onload = function () {
            var config = {
                vx: 4,
                vy: 4,
                height: 2,
                width: 2,
                count: 90,
                color: "255,255,255",
                stroke: "145, 168, 198",
                dist: 0,
                e_dist: 6000,
                max_conn: 5
            }
            CanvasParticle(config);
            var yu = '.188card.com';
            if (yu == ".card88.cn") {
                $("#vdCode").val($.cookie('cookieName'));
            }
        }
    </script>
</body>
</html>